#pragma once
/*
 * config module. 
 */
#include <string>
#include "util/singleton.h"

class CConfigMgr final {
protected:
	DECLARE_SINGLETON(CConfigMgr);
	CConfigMgr() = default;
	~CConfigMgr() = default;
public:
	bool Load(const char* filePath);

public:
	unsigned int getThreadSize() const;
	const std::string& getIP() const;
	unsigned short getPort() const;

	const std::string& getRedisIP() const;
	unsigned short getRedisPort() const;
	const std::string& getRedisPassword() const;

protected:
	// tcp listening information.
	unsigned int m_threadSize;
	std::string  m_ip;
	unsigned short m_port;

	// redis connection information.
	std::string m_redisIP;
	unsigned short m_redisPort;
	std::string m_redisPasswd;
};